;; 一些其他的elisp

;; 安装tabbar
(require 'tabbar)
(tabbar-mode 1)
;; 设置tabbar外观
;; 设置默认主题: 字体, 背景和前景颜色，大小
(set-face-attribute 'tabbar-default nil
		    :family "Consolas-10"
		    :background "gray80"
		    :foreground "black"
		    :height 0.8
		    )
;; 设置左边按钮外观：外框框边大小和颜色
(set-face-attribute 'tabbar-button nil
		    :inherit 'tabbar-default
		    :box '(:line-width 1 :color "gray30")
		    )
;; 设置当前tab外观：颜色，字体，外框大小和颜色
(set-face-attribute 'tabbar-selected nil
		    :inherit 'tabbar-default
		    :foreground "DarkGreen"
		    :background "LightGoldenrod"
		    ;; :box '(:line-width 2 :color "DarkGoldenrod")
		    ;; :overline "black"
		    ;; :underline "black"
		    :weight 'bold
		    )
;; 设置非当前tab外观：外框大小和颜色
(set-face-attribute 'tabbar-unselected nil
		    :inherit 'tabbar-default
		    :foreground "black"
		    :box '(:line-width 2 :color "gray70")
		    )

(defun tabbar-buffer-groups ()
  "Return the list of group names the current buffer belongs to.
 This function is a custom function for tabbar-mode's tabbar-buffer-groups.
 This function group all buffers into 3 groups:
 Those Dired, those user buffer, and those emacs buffer.
 Emacs buffer are those starting with “*”."
   (list
    (cond
     ((eq major-mode 'dired-mode)
      "Dired"
      )
     ((eq major-mode 'shell-mode)
      "Shell Buffers"
      )
     ((string-equal "*" (substring (buffer-name) 0 1))
      "Emacs Buffers"
      )
     (t
      "User Buffer"
      )
     ))) ;; from Xah Lee    ;;at wiki
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)

;; ;; emms
;; (require 'emms-setup)
;; (emms-standard)
;; (emms-default-players)
;; ;; coding settings
;; (setq emms-info-mp3info-coding-system 'utf-8
;;       emms-cache-file-coding-system 'utf-8
;;       emms-i18n-default-coding-system '(utf-8 . utf-8)
;;       )

(provide 'jerry-other-elisp)
